let app = new Vue({
    el: "#todoapp",
    data: {
        list: ["写代码", "吃饭饭", "睡觉觉"],
        inputValue: "好好学习,天天向上"
    },
    methods: {
        add: function () {
            if (this.inputValue == "") {
                alert("没有值")
            } else {
                this.list.push(this.inputValue)
                this.inputValue = ""
            }
        },
        remove: function (index) {
            console.log("删除")
            console.log(index)
            this.li.splice(index, 1)
        },
        clear: function () {
            this.list = []
        }
    },
})